/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author Aurelio
 */
public abstract class Validador {
    public static boolean validaString(String...palavras){
        List<String> lista = new ArrayList<String>();
        for (int i=0; i < palavras.length; i++) {
            lista.add(palavras[i]);              
        }
        
        for (Iterator<String> it = lista.iterator(); it.hasNext();) {
            String string = it.next();
            if(string == null ||"".equals(string)){
                return false;
            }
        }
        return false;
    }
    
    public static boolean validaString(String string){
        if(string == null ||"".equals(string)){
            return false;
        }else{
            return true;
        }
    }
    
    public static void imprimirLista(List<Object> lista){
        for (Iterator<Object> it = lista.iterator(); it.hasNext();) {
            Object object = it.next();
            System.err.println(object.toString());
        }
    }
    
    public static boolean validaObjeto(Object o){
        if(o == null){
            return false;
        }
        return true;
    }
}
